home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / c_course.zip / COMPILER.TXT < prev    next >
Text File  |  1989-12-30  |  30KB  |  924 lines

  1.  
  2.  
  3.         Coronado Enterprises C TUTOR                July 7, 1986
  4.  
  5.         COMPILER.DOC file
  6.  
  7.         Notes on a few C compilers.
  8.  
  9.              It is assumed that you have a C compiler and that you have
  10.         somehow learned to use it.  Some helping hints are given below
  11.         for some of the more popular compilers and even if your partic-
  12.         ular compiler is not listed, some of the hints given for other
  13.         compilers may help you with yours.  Some standards do tend to
  14.         exist within compilers and compiler writers tend to do things
  15.         basically the same way.  If notes are not given below about your
  16.         compiler, we at Coronado Enterprises will be unable to help.  We
  17.         have listed notes on all of the compilers we have available for
  18.         evaluation or use.  These notes are not intended to be exhaustive
  19.         or used as the basis for a final decision on your part to select
  20.         a given compiler.  Exhaustive notes and evaluations are given
  21.         regularly in computer publications.  If you are undecided as to
  22.         which compiler you should use, you are directed to these.
  23.  
  24.         ******************************************************************
  25.  
  26.         The following compilers have been tested on all files in chapters
  27.         1 through 13 and the results are noted.
  28.  
  29.         1. Aztec C86 version 3.20e (Commercial)    This is a very capa-
  30.               ble compiler that can do nearly anything you ask of it.
  31.               Even so, it is still reasonably small and can easily be
  32.               used with a dual floppy machine.  It compiles very fast,
  33.               but was not used enough to gain the experience to comment
  34.               very much on it and its capabilities.  It includes enough
  35.               additional utilities that it seems to have no limit.  The
  36.               two smaller models were not available for evaluation at
  37.               all.  Due to the complete lack of an index in the documen-
  38.               tation, and the fact that the documentation assumes a high
  39.               level of proficiency in C, this system is not recommended
  40.               for the beginner.
  41.  
  42.         2. Datalight C compiler - version 1.15    This compiler is very
  43.               inexpensive, but compiles very quickly to an unusually fast
  44.               executing file compared to its price.  However, it does not
  45.               handle I/O properly, (the putchar() does not output to the
  46.               monitor in programs that work with all other compilers), and
  47.               it causes the system to crash following an attempt to link
  48.               files with errors.  Due to these oversights on the part of
  49.               the compiler writer, this implementation is not recommended
  50.               for any purpose.  If these shortcomings are fixed in future
  51.               releases, it will be a good system for use on a floppy only
  52.               system because the files are small.
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                                    1
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.         3. DeSmet C Compiler - version 2.51       This relatively inexpen-
  70.               sive compiler does an excellent job, especially when consid-
  71.               ering the price.  It compiles very fast and results in fast
  72.               executable files.  It does some things in an unstandard way
  73.               but all compilers do since there is no standard yet.  This
  74.               would be an excellent choice for beginning and for most of
  75.               your programming needs.  It is extremely easy to use.
  76.  
  77.         4. Ecosoft C compiler - ver 3.11 & 3.13    This compiler sells for
  78.               only $59.95 and is as complete a compiler as you can find if
  79.               you only need a small memory model.  Their small model uses
  80.               64K for program and another 64K for data, so the limitation
  81.               is not very severe, and this compiler should meet nearly all
  82.               of your needs.  It does have one small problem that is being
  83.               fixed for all future editions.
  84.  
  85.               During a telephone conversation with Ecosoft, they acknowl-
  86.               edged the problem and told me if I would return the disks,
  87.               they would update them after the problem was fixed.  I did
  88.               return them as they said, and they updated my disks to
  89.               version 3.13, but with the problem still not fixed.  Another
  90.               phone call indicated that they had me listed for a free up-
  91.               date when it was fixed. By the time you read this, I expect
  92.               the problem to be history.
  93.  
  94.               The Ecosoft compiler is probably the best value of all comp-
  95.               ilers tested here.
  96.  
  97.         5. Lattice C compiler - version 2.15      This compiler has been
  98.               replaced with version 3.00 below but since many copies were
  99.               sold, it is very popular.  If you have a choice, don't buy
  100.               this one since there are far better compilers available for
  101.               the money.
  102.  
  103.         6. Lattice C compiler - version 3.00      This is a very capable
  104.               compiler that still has the ability to be run conveniently
  105.               with only two floppy disks.  If you want a high end compiler
  106.               to use on a dual floppy machine, this is probably your best
  107.               choice.  The documentation is nearly worthless, and you will
  108.               be left with a mess trying to get it set up until you gain
  109.               some experience programming in C.
  110.  
  111.         7. Microsoft C compiler - version 3.0     This is absolutely the
  112.               top of the line compiler and should be your choice if you
  113.               will be engaged in very serious programming.  It seems to
  114.               have essentially no limitations except that a hard disk is
  115.               required to use it due to the large files.  The documen-
  116.               tation that comes with this compiler is probably the best
  117.               I have ever seen for any compiler for any machine.  It is
  118.               simply fantastic.  It even has a complete definition of the
  119.               C programming language.
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                                    2
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.         8. MIX C compiler - version 1.0.0       This is an inexpensive,
  136.               yet very capable compiler that comes highly recommended for
  137.               the beginning C programmer because it is so easy to use.
  138.               It was used to develop the vast majority of the example
  139.               programs in this tutorial and it never failed to do any-
  140.               thing that I called upon it to do.  It does suffer one big
  141.               problem however, and that is the fact that the resultant
  142.               code is very slow running.  It is probably about one tenth
  143.               the speed of the others, unless you go to the trouble to
  144.               use the speedup utility included with the compiler.  Using
  145.               it will get the speed up to nearly the speed of the other
  146.               compilers.  It is very simple to use and it would be the
  147.               recommended compiler for use in learning to program in
  148.               C, and especially if you are limited to floppies on your
  149.               machine.  It is definitely worth the $39.95 purchase price.
  150.  
  151.  
  152.         ************** Aztec C86 version 3.20e (Commercial) *****************
  153.  
  154.         Note; The following suggested setup only uses the small memory and
  155.               program model which is sufficient for nearly all of your
  156.               programming needs.  It is suggested that you simply use this
  157.               configuration and as you gain experience with C, add some of
  158.               the other features.
  159.  
  160.               (suggested floppy disk setup)
  161.           Contents of Drive A
  162.         COMMAND.COM
  163.         CCL.BAT          (as listed below)
  164.         EDIT.COM         (your editor, whatever you use)
  165.         STDIO.H          (From the Aztec disks)
  166.         CTYPE.H          (From the Aztec disks)
  167.         *.C              (the files you wish to compile)
  168.  
  169.           Contents of Drive B
  170.         CC.EXE           (from the Aztec disks)
  171.         AS.EXE           (from the Aztec disks, may need to move to a:)
  172.         LN.EXE           (from the Aztec disks)
  173.         C.LIB            (from the Aztec disks)
  174.         M.LIB            (from the Aztec disks)
  175.  
  176.              (suggested hard disk setup)
  177.         Put all above files in one directory, and remove the references to
  178.         drive B in the batch file below.
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.                                    3
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.              (Start of batch file CCL.BAT)
  202.         REM THIS IS THE AZTEC C COMPILER
  203.         IF EXIST %1 GOTO ERROR
  204.         EDIT %1.C
  205.         B:CC %1.C
  206.         IF ERRORLEVEL 1 GOTO CLERR
  207.         B:LN %1.O B:M.LIB B:C.LIB
  208.         IF ERRORLEVEL 1 GOTO CLERR
  209.         %1
  210.         PAUSE
  211.         ERASE %1.O
  212.         ERASE %1.EXE
  213.         ERASE %1.BAK
  214.         GOTO DONE
  215.  
  216.         :ERROR
  217.         REM DO NOT INCLUDE THE .C EXTENSION
  218.         PAUSE
  219.         GOTO DONE
  220.  
  221.         :CLERR
  222.         REM COMPILE OR LINK ERROR
  223.         PAUSE
  224.  
  225.         :DONE
  226.             (end of CCL.BAT file)
  227.  
  228.         The following problems were found when using the Aztec C86
  229.         compiler on the files in chapters 1 through 13.  The files
  230.         included in chapter 14 were not compiled with this compiler.
  231.  
  232.         Chapter 5 - BACKWARD.C  This compiler uses more than 8 characters
  233.                     of the variable name.  Change both calls to the func-
  234.                     tion to read the same, forward_and_backward (lines
  235.                     8 and 19).
  236.  
  237.         Chapter 9 - SINGLEIO.C  No getch() function. The manual describes
  238.                     how to read in a character without waiting for the
  239.                     carriage return on pages "libov.19" through "libov.21".
  240.                     It is not a simple thing to do nor is it in any way
  241.                     standard (as compared to other systems).  It will not
  242.                     be elaborated on here.
  243.  
  244.         Chapter 9 - BETTERIN.C  No Getch() function.  See above.
  245.  
  246.         Chapter 11 - UNION1.C  The bytes have ff in high order bits if the
  247.                      MSB of the byte is on.  Refer to text about this.
  248.  
  249.         Chapter 13 - BITOPS.C  The bytes have ff in high order bits if the
  250.                      MSB of the byte is on.  Refer to UNION1.C note.
  251.  
  252.         Chapter 13 - UPLOW.C  Change function name to mix_up_the_chars.
  253.  
  254.  
  255.  
  256.  
  257.  
  258.                                    4
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.         ************* DeSmet C Compiler - version 2.51 **********************
  268.  
  269.         Note; The following setup can be run on a single floppy system, but
  270.               you may want to move some of the files to another drive.
  271.  
  272.           Contents of drive A
  273.         COMMAND.COM
  274.         C88.EXE            (From the DeSmet disks)
  275.         GEN.EXE            (From the DeSmet disks)
  276.         ASM88.EXE          (From the DeSmet disks)
  277.         STDIO.H            (From the DeSmet disks)
  278.         BIND.EXE           (From the DeSmet disks)
  279.         CSTDIO.S           (From the DeSmet disks)
  280.         CCL.BAT            (As defined below)
  281.  
  282.         A hard disk setup would be the same.
  283.  
  284.           (Start of batch file CCL.BAT)
  285.         REM DESMET C COMPILER
  286.         IF EXIST %1 GOTO ERROR
  287.         REM THE NEXT LINE CALLS WHATEVER EDITOR YOU USE
  288.         EDIT %1.C
  289.         C88 %1
  290.         IF ERRORLEVEL 1 GOTO CLERR
  291.         BIND %1
  292.         IF ERRORLEVEL 1 GOTO CLERR
  293.         %1
  294.         PAUSE
  295.         ERASE %1.EXE
  296.         ERASE %1.BAK
  297.         ERASE %1.O
  298.         GOTO DONE
  299.  
  300.         :ERROR
  301.         REM DO NOT INCLUDE THE .C EXTENSION
  302.         PAUSE
  303.         GOTO DONE
  304.  
  305.         :CLERR
  306.         REM COMPILE OR LINK ERROR
  307.         PAUSE
  308.  
  309.         :DONE
  310.           (End of batch file CCL.BAT)
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                                    5
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.         Problems encountered with DeSmet C on files in chapters 1 - 13.
  334.         The files in chapter 14 were not attempted with this compiler
  335.         and will be left up to the user to try.
  336.  
  337.         Chapter 5 - BACKWARD.C  This compiler uses more than eight charac-
  338.                     ters of the variable name.  Change both calls to the
  339.                     function so they read the same, forward_and_backward
  340.                     (lines 8 and 19).
  341.  
  342.         Chapter 9 - SIMPLEIO.C  The function getchar() reads in immediately
  343.                     which is different from all other compilers.  The dis-
  344.                     cussion in the text therefore does not agree with this
  345.                     compilers operation.
  346.  
  347.         Chapter 9 - SINGLEIO.C  There is no getch() function, but getchar()
  348.                     does what it is supposed to do.  Sustitute getchar()
  349.                     for getch() in line 10 and remove the putchar(c) from
  350.                     the next line and the program will act as defined in
  351.                     the text.
  352.  
  353.         Chapter 9 - BETTERIN.C  Same as for SINGLEIO.C above.
  354.  
  355.         Chapter 13 - CHARCLAS.C  Remove the #include "ctype.h" from the
  356.                     second line.  It is not needed with this compiler.
  357.  
  358.         Chapter 13 - UPLOW.C  Remove the #include "ctype.h" from the second
  359.                     line.  It is not needed with this compiler.  Also change
  360.                     the function name to mix_up_the_chars because this com-
  361.                     piler uses more than 8 characters for a variable name.
  362.  
  363.  
  364.  
  365.         ************** Ecosoft C compiler - version 3.11 & 3.13 *************
  366.  
  367.             (recommended setup)
  368.         Exactly as listed in the manual - The documentation is excellent and
  369.         very clear.  Only the hard disk setup was tested.
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.                                    6
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.              (start of batch file used - CCL.BAT)
  400.         IF EXIST %1 GOTO ERROR
  401.         CED %1.C
  402.         CC %1
  403.         IF ERRORLEVEL 1 GOTO CLERR
  404.         %1
  405.         ERASE %1.EXE
  406.         ERASE %1.OBJ
  407.         ERASE %1.BAK
  408.         GOTO DONE
  409.  
  410.         :ERROR
  411.         REM DO NOT INCLUDE THE .C EXTENSION
  412.         PAUSE
  413.         GOTO DONE
  414.  
  415.         :CLERR
  416.         REM COMPILE OR LINK ERROR
  417.         PAUSE
  418.  
  419.         :DONE
  420.             (end of batch file used)
  421.  
  422.  
  423.         Required changes for use with Ecosoft C compiler - ver 3.11 & 3.13
  424.  
  425.         Note; During compilation of a few of the files you will get a small
  426.               number of warnings.  These warnings are obvious and are meant
  427.               to be an aid to you in discovering possible errors in your code.
  428.               One of the most obvious is when a floating point number is
  429.               assigned to an integer.  This is done as an illustration for
  430.               you, but the compiler generates a warning and continues.  The
  431.               fact that this happens is a positve vote for this compiler.
  432.  
  433.         Chapter 5 - BACKWARD.C  This compiler used more than 8 characters for
  434.                     a variable name.  Change both calls to the function to
  435.                     read the same, forward_and_backward. (lines 8 and 19)
  436.  
  437.         Chapter 10 - READTEXT.C and READGOOD.C  Both of these files use the
  438.                     function fscanf() and look for a -1 at the end of the
  439.                     file.  The end of file does not return a -1 and the loop
  440.                     continues indefinitely.  This is the compiler error
  441.                     mentioned before and they say they are fixing it.
  442.                     Recomendation; Do not use this construct at this time.
  443.  
  444.         Chapter 11 - UNION1.C  The bytes have ff in the high order bits if
  445.                     the MSB is on.  Refer to text about this.
  446.  
  447.         Chapter 12 - All three files.  Add the line #include "malloc.h" to
  448.                     the beginning of each file.  This will define the type
  449.                     of return malloc will generate and will allow the pro-
  450.                     grams to operate as described.  Ecosoft is very picky
  451.                     about the constructs used, and requires the header to
  452.                     check for problems.
  453.  
  454.  
  455.  
  456.                                    7
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.         Chapter 13 - BITOPS.C  The bytes have ff in the high order bits if
  466.                     the MSB is on.  Refer to text about this.
  467.  
  468.         Chapter 13 - UPLOW.C  Change function name to mix_up_the_chars
  469.  
  470.         Chapter 14 - As of this writing, none of these files have been com-
  471.                     piled with this compiler.
  472.  
  473.  
  474.  
  475.         ************** Lattice C compiler - version 2.15 ********************
  476.  
  477.         Note; The following suggested setup only uses the small memory and
  478.               program model which is sufficient for nearly all of your
  479.               programming needs.  It is suggested that you simply use this
  480.               configuration and as you gain experience with C, add some of
  481.               the other features.
  482.  
  483.               (suggested floppy disk setup)
  484.           Contents of Drive A
  485.         COMMAND.COM
  486.         CCL.BAT          (as listed below)
  487.         EDIT.COM         (your editor, whatever you use)
  488.         STDIO.H          (From the Lattice disks)
  489.         DOS.H            (From the Lattice disks)
  490.         CTYPE.H          (From the Lattice disks)
  491.         *.C              (the files you wish to compile)
  492.         CS.OBJ           (From the Lattice disks)
  493.  
  494.           Contents of Drive B
  495.         LC1.EXE          (From the Lattice disks)
  496.         LC2.EXE          (From the Lattice disks)
  497.         LINK.EXE         (From your DOS system disks)
  498.         LCMS.LIB         (From the Lattice disks)
  499.         LCS.LIB          (From the Lattice disks)
  500.  
  501.              (suggested hard disk setup)
  502.         Put all above files in one directory, and remove the references to
  503.         drive B in the batch file below.
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.                                    8
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.               (start of batch file CCL.BAT)
  532.         REM C COMPILER, LATTICE VERSION 2.15
  533.         IF EXIST %1 GOTO EXTERR
  534.         REM THE NEXT LINE CALLS WHATEVER SCREEN EDITOR YOU USE
  535.         EDIT %1.C
  536.         B:LC1 %1
  537.         IF ERRORLEVEL 1 GOTO P2ABT
  538.         B:LC2 %1
  539.         IF ERRORLEVEL 1 GOTO WAIT
  540.         REM THIS IS THE C LINKER
  541.         B:LINK CS+%1,%1,NUL,B:LCMS+B:LCS;
  542.         IF ERRORLEVEL 1 GOTO LKERFND
  543.         REM THE NEXT LINE IS THE EXECUTION LINE
  544.         %1
  545.         PAUSE
  546.         ERASE %1.EXE
  547.         ERASE %1.OBJ
  548.         ERASE %1.BAK
  549.         GOTO DONE
  550.  
  551.         :EXTERR
  552.         REM YOU PROBABLY INCLUDED THE .C EXTENTION, DO NOT INCLUDE IT
  553.         REM IT WILL CAUSE THE LINKER STEP TO FAIL
  554.         PAUSE
  555.         GOTO DONE
  556.  
  557.         :LKERFND
  558.         REM LINK ERROR(S) FOUND
  559.         PAUSE
  560.         GOTO DONE
  561.  
  562.         :P2ABT
  563.         REM PASS 2 ABORTED DUE TO PASS 1 ERRORS
  564.         PAUSE
  565.         GOTO DONE
  566.  
  567.         :WAIT
  568.         REM PASS 2 ERROR(S) FOUND
  569.         PAUSE
  570.         :DONE
  571.             ( end of batch file used )
  572.  
  573.         The following problems were found when using the Lattice C
  574.          compiler on the files included on this disk.
  575.  
  576.         All files - Warning: No STACK segment.
  577.                      This message occurs with every file, ignore it.
  578.                      It allows you to convert the resultant file to a
  579.                      *.COM file whick loads faster. (use EXE2BIN.EXE)
  580.  
  581.         Chapter 5 - FLOATSQ.C  Warning 85: function return value mismatch
  582.                      This appears to be a bug in the compiler but it
  583.                      doesn't affect the operation of the program.
  584.  
  585.  
  586.  
  587.  
  588.                                    9
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.         Chapter 11 - NESTED.C  Add the following line as the first line of
  598.                      the program to increase the internal stack size.
  599.                         int _stack = 4000;
  600.  
  601.         Chapter 11 - UNION1.C  (This program doesn't work with this compiler)
  602.                      According to all of the rules for use of C, this
  603.                      file should work just like the text says. Compiling
  604.                      it and running it with the other compilers resulted
  605.                      in the following;
  606.  
  607.                         C       C       0
  608.                      89AB      AB      89
  609.                      134A      4A      13
  610.                      9CE9      E9      9C
  611.                      2688      88      26
  612.                      B027      27      B0
  613.                      39C6      C6      39
  614.                      C365      65      C3
  615.                      4D04       4      4D
  616.  
  617.         Note; All files in Chapter 14 compile correctly with this compiler.
  618.               To link the Visual Calculator use;
  619.  
  620.               link cs+vc+data+file+video,vc,,lcms+lcs;
  621.  
  622.  
  623.  
  624.         ************** Lattice C compiler - version 3.00 ********************
  625.  
  626.         Note; The following suggested setup only uses the small memory and
  627.               program model which is sufficient for nearly all of your
  628.               programming needs.  It is suggested that you simply use this
  629.               configuration and as you gain experience with C, add some of
  630.               the other features.
  631.  
  632.               (suggested floppy disk setup)
  633.           Contents of Drive A
  634.         COMMAND.COM
  635.         CCL.BAT          (as listed below)
  636.         EDIT.COM         (your editor, whatever you use)
  637.         STDIO.H          (From the Lattice disks)
  638.         DOS.H            (From the Lattice disks)
  639.         CTYPE.H          (From the Lattice disks)
  640.         *.C              (the files you wish to compile)
  641.         CS.OBJ           (From the Lattice disks)
  642.  
  643.           Contents of Drive B
  644.         LC1.EXE          (From the Lattice disks)
  645.         LC2.EXE          (From the Lattice disks)
  646.         LINK.EXE         (must be IBM version 2.1 or later)
  647.         LCMS.LIB         (From the Lattice disks)
  648.         LCS.LIB          (From the Lattice disks)
  649.  
  650.  
  651.  
  652.  
  653.  
  654.                                    10
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.              (suggested hard disk setup)
  664.         Put all above files in one directory, and remove the references to
  665.         drive B in the batch file below.
  666.  
  667.  
  668.               (start of batch file CCL.BAT)
  669.         REM C COMPILER, LATTICE VERSION 3.00
  670.         IF EXIST %1 GOTO EXTERR
  671.         REM THE NEXT LINE CALLS WHATEVER SCREEN EDITOR YOU USE
  672.         EDIT %1.C
  673.         B:LC1 %1
  674.         IF ERRORLEVEL 1 GOTO P2ABT
  675.         B:LC2 %1
  676.         IF ERRORLEVEL 1 GOTO WAIT
  677.         REM THIS IS THE C LINKER
  678.         B:LINK CS+%1,%1,NUL,B:LCMS+B:LCS;
  679.         IF ERRORLEVEL 1 GOTO LKERFND
  680.         REM THE NEXT LINE IS THE EXECUTION CALL
  681.         %1
  682.         PAUSE
  683.         ERASE %1.EXE
  684.         ERASE %1.OBJ
  685.         ERASE %1.BAK
  686.         GOTO DONE
  687.  
  688.         :EXTERR
  689.         REM YOU PROBABLY INCLUDED THE .C EXTENTION, DO NOT INCLUDE IT
  690.         REM IT WILL CAUSE THE LINKER STEP TO FAIL
  691.         PAUSE
  692.         GOTO DONE
  693.  
  694.         :LKERFND
  695.         REM LINK ERROR(S) FOUND
  696.         PAUSE
  697.         GOTO DONE
  698.  
  699.         :P2ABT
  700.         REM PASS 2 ABORTED DUE TO PASS 1 ERRORS
  701.         PAUSE
  702.         GOTO DONE
  703.  
  704.         :WAIT
  705.         REM PASS 2 ERROR(S) FOUND
  706.         PAUSE
  707.         :DONE
  708.             ( end of batch file used )
  709.  
  710.         The following problems were found when using the Lattice C
  711.          compiler (version 3.00) on the files included on this disk.
  712.  
  713.         Chapter 5 - FLOATSQ.C  Warning 85: function return value mismatch
  714.                      This appears to be a bug in the compiler but it
  715.                      doesn't affect the operation of the program.
  716.  
  717.  
  718.  
  719.  
  720.                                    11
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.         Chapter 11 - NESTED.C  Add the following line as the first line of
  730.                      the program to increase the internal stack size.
  731.                         int _stack = 4000;
  732.  
  733.         Chapter 11 - UNION1.C   The bytes have ff in high order bits if
  734.                      the MSB of the byte is on.  Refer to text about this.
  735.  
  736.         Chapter 13 - BITOPS.C   The bytes have ff in high order bits if
  737.                      the MSB of the byte is on.
  738.  
  739.  
  740.         ******************** Microsoft Version 3.00 *************************
  741.  
  742.            (recommended setup)
  743.         Exactly as listed in the manual - The documentation for this compiler
  744.         is very clear, and if you follow the instructions as given by Micro-
  745.         soft, you will have no problem configuring your system.
  746.  
  747.            (start of batch file used )
  748.         IF EXIST %1 GOTO NOEXT
  749.         EDIT %1.C
  750.         MSC %1;
  751.         IF ERRORLEVEL 1 GOTO ERROR
  752.         LINK %1;
  753.         IF ERRORLEVEL 1 GOTO ERROR
  754.         %1
  755.         PAUSE
  756.         ERASE %1.EXE
  757.         ERASE %1.OBJ
  758.         ERASE %1.BAK
  759.         GOTO DONE
  760.  
  761.         :NOEXT
  762.         REM DO NOT INCLUDE THE .C EXTENSION
  763.         PAUSE
  764.         GOTO DONE
  765.  
  766.         :ERROR
  767.         REM COMPILE OR LINK ERROR FOUND
  768.         PAUSE
  769.  
  770.         :DONE
  771.            ( end of batch file )
  772.  
  773.         Note; The above batch file assumes a hard disk is being used.
  774.               The Microsoft compiler is extremely capable but because
  775.               of that, it is also very large and would be very diffi-
  776.               cult to use without a hard disk.  I would not recommend
  777.               that you try to use this compiler unless you have a hard
  778.               disk.  It is possible to use with a floppy based system,
  779.               but there would be much disk swapping leading to much
  780.               frustation.
  781.  
  782.  
  783.  
  784.  
  785.  
  786.                                    12
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.         Required changes for use with Microsoft C ver 3.0
  796.  
  797.         Chapter 5 - BACKWARD.C  This compiler uses more than 8 characters
  798.                     of the variable name.  Change both calls to the function
  799.                     to read the same, forward_and_backward (lines 8 and 19).
  800.  
  801.         Chapter 10 - READTEXT.C  Apparently the system clears the buffer
  802.                      before reading into it, so it only outputs an extra
  803.                      blank line instead of the word "lines." as described
  804.                      in the text.
  805.  
  806.         Chapter 11 - READGOOD.C  Notice that the extra blank line is not
  807.                      displayed here.
  808.  
  809.         Chapter 11 - NESTED.C     *** STACK OVERFLOW ***
  810.                      This message occurs during running of the program
  811.                      due to a lack of stack space because nearly every
  812.                      C compiler defaults to a stack size of 2048 bytes.
  813.                      To fix it, change the LINK call to
  814.                          LINK %1 /STACK:4000;
  815.                      for this program only.
  816.  
  817.         Chapter 11  UNION1.C    The bytes have ff in high order bits if
  818.                     the MSB of the byte is on.  Refer to text about this.
  819.  
  820.         Chapter 13  UPLOW.C     Change function name to mix_up_the_chars
  821.  
  822.         Chapter 13  BITOPS.C    The bytes have ff in high order bits if
  823.                     the MSB of the byte is on.
  824.  
  825.         Chapter 14  LIST.C & LISTF.C   Removing all references to the print
  826.                     file pointer "print_file_point" and using the standard
  827.                     predefined pointer "stdprn" for all print operations
  828.                     causes immediate print rather than bufferred print. The
  829.                     LIST.EXE on the distribution disk uses the standard
  830.                     pointer.  The method of printing in the files is used
  831.                     by most C compilers, but the standard method may be a
  832.                     part of the upcoming ANSI standard.
  833.  
  834.         Chapter 14  VC.C, FILE.C, DATA.C, VIDEO.C, and STRUCT.DEF
  835.                     Remove all references to "prtfile" and use "stdprn" in
  836.                     lines 123 and 135 of VC.C and in line 170 of FILE.C to
  837.                     cause immediate printing instead of delayed buffered
  838.                     printing.  The VC.EXE on the distribution disk was done
  839.                     this way and was compiled with the MS 3.00 C compiler.
  840.                     You can use the files as is if you don't mind the funny
  841.                     printing method.
  842.  
  843.         Note;  To link VC.EXE use  link vc+data+file+video;
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.                                    13
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.         ************** MIX C compiler - version 1.0.0 ***********************
  863.  
  864.               (suggested floppy disk setup)
  865.           Contents of Drive A
  866.         COMMAND.COM
  867.         CCL.BAT          (as listed below)
  868.         EDIT.COM         (your editor, whatever you use)
  869.         STDIO.H          (copied from STDIO on dist diskette)
  870.         RUNTIME.OVY      (from your distribution diskette)
  871.         SMALLCOM.OVY     (from your distribution diskette)
  872.         CLIB.MIX         (from your distribution diskette)
  873.         *.C              (the files you wish to compile)
  874.  
  875.           Contents of Drive B
  876.         Exact copy of your MIX distribution diskette
  877.  
  878.  
  879.            (start of batch file used CCL.BAT)
  880.         REM MIX C COMPILER
  881.         REM THE NEXT LINE CALLS WHATEVER FULL SCREEN EDITOR YOU USE
  882.         EDIT %1.C
  883.         B:CC %1
  884.         B:LINKER %1
  885.         %1
  886.            ( end of batch file used )
  887.  
  888.  
  889.         Note; The following problems were noted when compiling the files
  890.               in chapters 1 to 13 with this compiler.  The files in
  891.               chapter 14 were not compiled with this compiler.
  892.  
  893.         Chapter 9 - SINGLEIO.C  The system supplies a Linefeed for you so
  894.                     it doesn't quite work like the book says.
  895.  
  896.         Chapter 9 - BETTERIN.C  The system supplies a linefeed for you so
  897.                     it doesn't quite work like the book says.
  898.  
  899.         Chapter 13 - CHARCLAS.C  Remove #include "ctype.h" from program.
  900.  
  901.         Chapter 13 - UPLOW.C  Remove #include "ctype.h" from program.
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.                                    14
  919.  
  920.  
  921.  
  922.  
  923.  
  924.